<?php

include '../Config.php';

# objlib library code
include "{$objLibDir}/pdoExt.php";
include "{$objLibDir}/Util.php";
include "{$objLibDir}/Object.php";
include "{$objLibDir}/JoinerRelation.php";
include "{$objLibDir}/SortedJoinerRelation.php";
include "{$objLibDir}/KeyRelation.php";
include "{$objLibDir}/SortedKeyRelation.php";
include "{$objLibDir}/Query.php";
include "{$objLibDir}/Node.php";

# englopya library code
foreach (glob ("{$classesDir}/*.php") as $componentFile) {
        include_once ($componentFile);
}

foreach (glob ("{$classesDir}/Component/*.php") as $componentFile) {
        include_once ($componentFile);
}

# englopya Relations
foreach (glob ("{$classesDir}/Relations/*.php") as $includeFile) {
	include_once ($includeFile);
}

include "{$rootDir}/dbConn.php";

$root = new Nav ($adminRootNavId);
$urlArray = array ();
	
if (isset($_SERVER['PATH_INFO'])) {
	$urlArray = explode ('/', $_SERVER['PATH_INFO']);
	array_shift ($urlArray);
}

if (($out = $root->navigate ($urlArray)) === false) {
	header ('HTTP/1.1: 404 Not Found');
}

?>